<?php
class Sabai_Template_Default_Helper_XiggTopVotedNodes extends Sabai_Template_Default_Helper
{
    function execute($limit = 10)
    {
        $model =& $this->_locator->getService('Model');
        $node_r =& $model->getRepository('Node');
        $nodes =& $node_r->fetchByCriteria(Sabai_Model_Criteria::createValue('node_hidden', 0), $limit, 0, 'node_vote_count', 'DESC');
        $nodes->rewind();;
        return $nodes;
    }
}